Documentation > CMS Template API Library > Input > NextPanel(String,ListPanelType,Nullable[Int32],Nullable[Int32],SortOrder,String,Boolean)
NextPanel
Gets the next available panel from the named list. Always returns at least one entry. Uses data already stored in the asset.
public System.Boolean NextPanel(String,ListPanelType,Nullable[Int32],Nullable[Int32],SortOrder,String,Boolean)
Returns
Whether there is an available panel.
Parameters
Name | Description | Type |
---|---|---|
name | Name of the list of panels. Must not be the same as any other list names or field names unless isAutoIndexed is false. | System.String |
type | Type of list to display. Default is ListPanelType.Regular | CrownPeak.CMSAPI.ListPanelType |
min | Optional: Minimum number of panels (but always at least one). Default is null | Nullable<Int32> |
max | Optional: Maximum number of panels. Default is null | Nullable<Int32> |
sort | Optional: Sort order used for the sorted list type. Must be specified if and only if the type is ListPanelType.Sorted | CrownPeak.CMSAPI.SortOrder |
displayName | Optional: Name to display for the list panel. Not applicable in Classic. Default is null | System.String |
isAutoIndexed | Optional: Whether the panel handles the list index field automatically. In most cases this should be true, unless another field in the list has the same name as the list. Default is true | System.Boolean |
Code Example
C#
Sample:
SortOrder order = SortOrder.OrderBy("title"); while(Input.NextPanel("title_counter", ListPanelType.Sorted, sort: order)) { Input.ShowTextBox("Title", "title"); //Get the value of a field on the panel called "foo" string valueOfFieldFoo = Input.CurrentPanel["foo"]; }